/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Data;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author saleem
 */
@Entity
@Table(name = "syndrome")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Syndrome.findAll", query = "SELECT s FROM Syndrome s"),
    @NamedQuery(name = "Syndrome.findBySynID", query = "SELECT s FROM Syndrome s WHERE s.synID = :synID"),
    @NamedQuery(name = "Syndrome.findByName", query = "SELECT s FROM Syndrome s WHERE s.name = :name"),
    @NamedQuery(name = "Syndrome.findByDescription", query = "SELECT s FROM Syndrome s WHERE s.description = :description")})
public class Syndrome implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "SynID")
    private Integer synID;
    @Size(max = 50)
    @Column(name = "Name")
    private String name;
    @Size(max = 500)
    @Column(name = "Description")
    private String description;

    public Syndrome() {
    }

    public Syndrome(Integer synID) {
        this.synID = synID;
    }

    public Integer getSynID() {
        return synID;
    }

    public void setSynID(Integer synID) {
        this.synID = synID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (synID != null ? synID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Syndrome)) {
            return false;
        }
        Syndrome other = (Syndrome) object;
        if ((this.synID == null && other.synID != null) || (this.synID != null && !this.synID.equals(other.synID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Data.Syndrome[ synID=" + synID + " ]";
    }
    
}
